<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('入职历史查询')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: bootstrap-editable-css"/>
    <th:block th:include="include :: container-css"/>
    <th:block th:include="include :: select2-css"/>
</head>
<style>
    .fixed-table-container .bs-checkbox .th-inner {
        padding: 8px 8px !important;
    }

</style>
<body class="gray-bg">
<div class="modal inmodal fade" id="myModal1" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span>
                </button>
                <h4 class="modal-title">入职历史查询</h4>
            </div>
            <div class="modal-body">
                <p>
                    入职日期从:
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input type="text" id="BeginDate" class="form-control laydate-demo-2" placeholder="yyyy-MM-dd">
                </div>
                </p>
                <p>
                    入职日期到:
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input type="text" id="EndDate" class="form-control laydate-demo-1" placeholder="yyyy-MM-dd">
                </div>
                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-white" id="close" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" onclick="getData()">确定</button>
            </div>
        </div>
    </div>
</div>
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <p>工号：</p>
                            <input type="text" name="badge"/>
                        </li>
                        <li>
                            <p>姓名：</p>
                            <input type="text" name="name"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<th:block th:include="include :: hr-help-js"/>
<th:block th:include="include :: datetimepicker-js"/>

<script th:inline="javascript">

    var prefix = ctx + "entryManage/newEmpRegister";
    $(function () {
        $("#myModal1").modal('show');
        $(".datetimepicker-demo-2").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-2',
                type: 'date'
            });

        });
        $(".datetimepicker-demo-1").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-1',
                type: 'date'
            });

        });
    });

    function getData() {
        var beginDate = $("#BeginDate").val();
        var endDate = $("#EndDate").val();
        var columns = [];
        var id = {field: 'id', title: '序号'};
        var badge = {field: 'badge', title: '工号'};
        var name = {field: 'name', title: '姓名'};
        var Ename = {field: 'Ename', title: '英文名'};
        var compName = {field: 'compName', title: '公司名称'};
        var depName = {field: 'depName', title: '部门名称'};
        var jobName = {field: 'jobName', title: '岗位'};
        var JobGradeTitle = {field: 'JobGradeTitle', title: '岗位级别'};
        var ReportToName = {field: 'ReportToName', title: '直接上级'};
        var WFReportToName = {field: 'WFReportToName', title: '职能上级'};
        var JobStatusTitle = {field: 'JobStatusTitle', title: '在岗状态'};
        var EmpTypeTitle = {field: 'EmpTypeTitle', title: '员工类型'};
        var hxgg = {field: 'hxgg', title: '核心高管'};
        var WorkCityTitle = {field: 'WorkCityTitle', title: '工作城市'};
        var EMail = {field: 'EMail', title: '公司邮箱'};
        var officePhone = {field: 'officePhone', title: '办公电话'};
        var archiveid = {field: 'archiveid', title: '档案号'};
        var JoinTypeTitle = {field: 'JoinTypeTitle', title: '入职渠道'};
        var JoinDate = {field: 'JoinDate', title: '入职日期'};
        var CyearAdjust = {field: 'CyearAdjust', title: '司龄调整'};
        var WorkBeginDate = {field: 'WorkBeginDate', title: '参加工作时间'};
        var PracBeginDate = {field: 'PracBeginDate', title: '实习开始日期'};
        var PracTerm = {field: 'PracTerm', title: '实习期限(月)'};
        var PracEndDate = {field: 'PracEndDate', title: '实习终止日期'};
        var ProbBeginDate = {field: 'ProbBeginDate', title: '试用开始日期'};
        var ProbTerm = {field: 'ProbTerm', title: '试用期限(月)'};
        var ProbEndDate = {field: 'ProbEndDate', title: '试用终止日期'};
        var ConTypeTitle = {field: 'ConTypeTitle', title: '合同类型'};
        var ConPropertyTitle = {field: 'ConPropertyTitle', title: '合同属性'};
        var Contract = {field: 'Contract', title: '签约单位'};
        var ConBeginDate = {field: 'ConBeginDate', title: '合同开始日期'};
        var ConTerm = {field: 'ConTerm', title: '合同期(年)'};
        var ConEndDate = {field: 'ConEndDate', title: '合同结束日期'};
        var CountryTitle = {field: 'CountryTitle', title: '国籍/地区'};
        var NationTitle = {field: 'NationTitle', title: '名族'};
        var CertTypeTitle = {field: 'CertTypeTitle', title: '证件类型'};
        var CertNo = {field: 'CertNo', title: '证件编号'};
        var GenderTitle = {field: 'GenderTitle', title: '性别'};
        var BirthDay = {field: 'BirthDay', title: '出生日期'};
        var nativeplaceTitle = {field: 'nativeplaceTitle', title: '籍贯2'};
        var Resident = {field: 'Resident', title: '籍贯'};
        var certaddress = {field: 'certaddress', title: '身份证地址'};
        var MarriageTitle = {field: 'MarriageTitle', title: '婚姻状况'};
        var PartyTitle = {field: 'PartyTitle', title: '政治面貌'};
        var army = {field: 'army', title: '是否参军'};
        var leavearmy = {field: 'leavearmy', title: '退伍部队'};
        var HighLevelTitle = {field: 'HighLevelTitle', title: '最高学历'};
        var HighDegreeTitle = {field: 'HighDegreeTitle', title: '最高学位'};
        var highschool = {field: 'highschool', title: '最高学历毕业院校'};
        var highenddate = {field: 'highenddate', title: '最高学历毕业时间'};
        var Major = {field: 'Major', title: '最高学历专业'};
        var HighTitle = {field: 'HighTitle', title: '最高职称/资格证书'};
        var Address = {field: 'Address', title: '现在住址'};
        var Tel = {field: 'Tel', title: '联系电话'};
        var eMailPers = {field: 'eMailPers', title: '私人邮箱'};
        var EmergencyName = {field: 'EmergencyName', title: '紧急联系人'};
        var emergencytel = {field: 'emergencytel', title: '紧急联系人电话'};
        var Constellation = {field: 'Constellation', title: '星座'};
        var QQ = {field: 'QQ', title: 'QQ'};
        var Wechart = {field: 'Wechart', title: '微信'};
        var RegByName = {field: 'RegByName', title: '登记人'};
        var RegDate = {field: 'RegDate', title: '登记时间'};
        var InitializedByName = {field: 'InitializedByName', title: '确认人'};
        var InitializedTime = {field: 'InitializedTime', title: '确认时间'};
        var submitBy = {field: 'submitBy', title: '审核人'};
        var submitTime = {field: 'submitTime', title: '审核时间'};
        var ClosedByName = {field: 'ClosedByName', title: '封存人'};
        var ClosedTime = {field: 'ClosedTime', title: '封存时间'};

        columns.push(id,badge,name,Ename,compName,depName,jobName,JobGradeTitle,ReportToName,WFReportToName);
        columns.push(JobStatusTitle,EmpTypeTitle,hxgg,WorkCityTitle,EMail,officePhone,archiveid,JoinTypeTitle);
        columns.push(JoinDate,CyearAdjust,WorkBeginDate,PracBeginDate,PracTerm,PracEndDate,ProbBeginDate,ProbTerm);
        columns.push(ProbEndDate,ConTypeTitle,ConPropertyTitle,Contract,ConBeginDate,ConTerm,ConEndDate,CountryTitle);
        columns.push(NationTitle,CertTypeTitle,CertNo,GenderTitle,BirthDay,nativeplaceTitle,Resident,certaddress);
        columns.push(MarriageTitle,PartyTitle,army,leavearmy,HighLevelTitle,HighDegreeTitle,highschool,highenddate);
        columns.push(Major,HighTitle,Address,Tel,eMailPers,EmergencyName,emergencytel,Constellation,QQ,Wechart);
        columns.push(RegByName,RegDate,InitializedByName,InitializedTime,submitBy,submitTime,ClosedByName,ClosedTime);

        $("#close").click();
        var options = {
            url: prefix + "/entryHistory?beginDate=" + beginDate + "&endDate=" + endDate,
            height: $(window).height() - 120,
            modalName: "入职历史查询",
            columns: columns
        };
        $.table.init(options);
    }


</script>
</body>
</html>